Range

Function

This API is used to get the parameter range of Alarm > IO Alarm(cloud dedicated) > Alarm Output.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/AlarmConfig/AlarmOutput/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
channel_infoJson ObjectChannel information,see Table 2 for more information
channel_maxintTotal number of channels on the device.

Table 2

ParameterRangeTypeDescription
Local<-1Json ObjectJson see Table 3 for more information
...Json Object
IP_CH1<-1Json Object
...Json Object

Table 3

ParameterRangeTypeDescription
latch_time"10","20","40","60"或者“5”“10”“20”“30”stringAlarm output time.
schedule_listJson arrayJson,see Table 4 for more information
chnNum"Local<-1"...stringNumber of channels
chn_index"Local<-1"...stringChannel index

Table 4

ParameterRangeTypeDescription
items"Local->1",
"Local->2",
"Local->3",
"Local->4",
"Local->5",
"Local->6",
"Local->7",
"Local->8"
stringChannel information
enableboolCheck whether the schedule is enabled
start_time0~1439intstart time
end_time0~1440intend time
weekday"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
stringnumber of days

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 1,
        "channel_info": {
            "type": "object",
            "items": {"Local->1": {
                "type": "object",
                "items": {
                    "latch_time": {
                        "type": "string",
                        "items": [
                            "5",
                            "10",
                            "20",
                            "30"
                        ]
                    },
                    "schedule_list": {
                        "type": "array",
                        "min_size": 0,
                        "max_size": 8,
                        "items": {
                            "type": "string",
                            "items": [
                                "Local->1",
                                "Local->2",
                                "Local->3",
                                "Local->4",
                                "Local->5",
                                "Local->6",
                                "Local->7",
                                "Local->8",
                                {
                                    "type": "string",
                                    "items": [
                                        "Local->1",
                                        "Local->2",
                                        "Local->3",
                                        "Local->4",
                                        "Local->5",
                                        "Local->6",
                                        "Local->7",
                                        "Local->8"
                                    ],
                                    "enable": {"type": "bool"},
                                    "start_time": {
                                        "type": "int32",
                                        "min": 0,
                                        "max": 1439
                                    },
                                    "end_time": {
                                        "type": "int32",
                                        "min": 0,
                                        "max": 1440
                                    },
                                    "weekday": {
                                        "type": "array",
                                        "min_size": 1,
                                        "max_size": 7,
                                        "items": [{
                                            "type": "string",
                                            "items": [
                                                "Sunday",
                                                "Monday",
                                                "Tuesday",
                                                "Wednesday",
                                                "Thursday",
                                                "Friday",
                                                "Saturday"
                                            ]
                                        }]
                                    }
                                }
                            ]
                        }
                    }
                }
            }}
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.